﻿namespace Home.Security.Authentication.IdentityProviders
{
    using System;
    using System.Collections.Generic;
    using System.Diagnostics;
    using System.Linq;
    using System.Text;
    using System.Threading.Tasks;

    internal static class IdentityProviderFactory
    {
        public static IdentityProvider Create(AuthenticationType type)
        {
            Debug.Assert(Enum.IsDefined(typeof(AuthenticationType), type));

            switch (type)
            {
                case AuthenticationType.QQ:
                    return new IdentityProviderQQ();
                case AuthenticationType.Sina:
                    return new IdentityProviderSina();
                case AuthenticationType.WeChat:
                    return new IdentityProviderWeChat();
            }

            throw new NotImplementedException();
        }
    }
}
